﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using YAPL.Language.Core.Types;

namespace YAPL.Language.Core.Exceptions {
	public class YAPLBadArgumentException : YAPLException {
		private readonly YAPLObject _arg;

		public YAPLBadArgumentException(YAPLObject arg) {
			_arg = arg;
		}

		public YAPLBadArgumentException(string message, YAPLObject arg) : base(message) {
			_arg = arg;
		}

		public YAPLBadArgumentException(string message, Exception innerException, YAPLObject arg) : base(message, innerException) {
			_arg = arg;
		}

		protected YAPLBadArgumentException(SerializationInfo info, StreamingContext context, YAPLObject arg) : base(info, context) {
			_arg = arg;
		}

		public YAPLObject Arg {
			get { return _arg; }
		}
	}
}
